Skip to contentSkip to conversation

Change in openvpn[master]: Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

Openvpn-devel In review plaisthos (Code Review) 3 participants 6 messages Nov 30, 2023 – Dec 2, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1701361470000.Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c@...2715...

#1 lore raw

Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/463?usp=email

to review the following change.

Change subject: Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway
......................................................................

Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

This debug code is not very useful as it is outdated and the same functionality is provided by --show-gateway

Change-Id Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c

---
M src/openvpn/init.c

1 file changed, 0 insertions(+), 11 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/463/1

src/openvpn/init.c +0 -11
index abba748..fdab26b 100644
@@ -885,17 +885,6 @@
     return false;
 #endif
 
-#ifdef TEST_GET_DEFAULT_GATEWAY
-    {
-        struct route_gateway_info rgi;
-        struct route_ipv6_gateway_info rgi6;
-        get_default_gateway(&rgi);
-        get_default_gateway_ipv6(&rgi6, NULL);
-        print_default_gateway(M_INFO, &rgi, &rgi6);
-        return false;
-    }
-#endif
-
 #ifdef GEN_PATH_TEST
     {
         struct gc_arena gc = gc_new();

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/463?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c
Gerrit-Change-Number: 463
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/463?usp=email )

Change subject: Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/463?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c
Gerrit-Change-Number: 463
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Fri, 01 Dec 2023 10:37:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

In reply to a message not in the archive

From: Arne Schwabe <[email protected]...>

This debug code is not very useful as it is outdated and the same functionality is provided by --show-gateway

Change-Id Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/463
This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>

src/openvpn/init.c +0 -11
index abba748..fdab26b 100644
@@ -885,17 +885,6 @@
     return false;
 #endif
 
-#ifdef TEST_GET_DEFAULT_GATEWAY
-    {
-        struct route_gateway_info rgi;
-        struct route_ipv6_gateway_info rgi6;
-        get_default_gateway(&rgi);
-        get_default_gateway_ipv6(&rgi6, NULL);
-        print_default_gateway(M_INFO, &rgi, &rgi6);
-        return false;
-    }
-#endif
-
 #ifdef GEN_PATH_TEST
     {
         struct gc_arena gc = gc_new();
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

Wasn't even aware we had a TEST_... for this - and indeed, why, if we have a run-time-argument. But interestingly enough, seems I even added IPv6 default gateway handling to that dead function... thorough me.

Your patch has been applied to the master and release/2.6 branch.

commit 6158228f16836f56a564d4533e7b513dc6170854 (master) commit 3168e1af929d7061e0ec2be049f6beea73c49a5a (release/2.6)

Author: Arne Schwabe
Date:   Fri Dec 1 12:17:17 2023 +0100
     Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Frank Lichtenheld <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg27624.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/463?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld

Change subject: Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway
......................................................................

Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

This debug code is not very useful as it is outdated and the same functionality is provided by --show-gateway

Change-Id Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27624.html

---
M src/openvpn/init.c

1 file changed, 0 insertions(+), 11 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/63/463/2

src/openvpn/init.c +0 -11
index ca42c92..9972ed7 100644
@@ -880,17 +880,6 @@
     return false;
 #endif
 
-#ifdef TEST_GET_DEFAULT_GATEWAY
-    {
-        struct route_gateway_info rgi;
-        struct route_ipv6_gateway_info rgi6;
-        get_default_gateway(&rgi);
-        get_default_gateway_ipv6(&rgi6, NULL);
-        print_default_gateway(M_INFO, &rgi, &rgi6);
-        return false;
-    }
-#endif
-
 #ifdef GEN_PATH_TEST
     {
         struct gc_arena gc = gc_new();

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/463?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c
Gerrit-Change-Number: 463
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/463?usp=email )

Change subject: Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway
......................................................................

Remove TEST_GET_DEFAULT_GATEWAY as it duplicates --show-gateway

This debug code is not very useful as it is outdated and the same functionality is provided by --show-gateway

Change-Id Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27624.html

---
M src/openvpn/init.c

1 file changed, 0 insertions(+), 11 deletions(-)
src/openvpn/init.c +0 -11
index ca42c92..9972ed7 100644
@@ -880,17 +880,6 @@
     return false;
 #endif
 
-#ifdef TEST_GET_DEFAULT_GATEWAY
-    {
-        struct route_gateway_info rgi;
-        struct route_ipv6_gateway_info rgi6;
-        get_default_gateway(&rgi);
-        get_default_gateway_ipv6(&rgi6, NULL);
-        print_default_gateway(M_INFO, &rgi, &rgi6);
-        return false;
-    }
-#endif
-
 #ifdef GEN_PATH_TEST
     {
         struct gc_arena gc = gc_new();

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/463?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie7fd59cc84e2eb024086c28c2ec2a5606a2b2e7c
Gerrit-Change-Number: 463
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged